package cn.sciento.transfer.api.dto;

import java.util.Date;

public class TransDataRequestDTO {
  private int page;
  
  private int pageSize;
  
  private int totalSize;
  
  private Date timeStamp;
  
  private Long tenantId;
  
  public String builderSqlForMyBatis(String tableName) {
    StringBuilder sqlBuilder = new StringBuilder(32);
    sqlBuilder.append("<script>\n");
    sqlBuilder.append("select * from ").append(tableName);
    if (this.tenantId != null)
      sqlBuilder.append(" and tenant_id = ").append(this.tenantId); 
    sqlBuilder.append("\n</script>");
    return sqlBuilder.toString();
  }
  
  public int getPage() {
    return this.page;
  }
  
  public void setPage(int page) {
    this.page = page;
  }
  
  public int getPageSize() {
    return this.pageSize;
  }
  
  public void setPageSize(int pageSize) {
    this.pageSize = pageSize;
  }
  
  public int getTotalSize() {
    return this.totalSize;
  }
  
  public void setTotalSize(int totalSize) {
    this.totalSize = totalSize;
  }
  
  public Date getTimeStamp() {
    return this.timeStamp;
  }
  
  public void setTimeStamp(Date timeStamp) {
    this.timeStamp = timeStamp;
  }
  
  public Long getTenantId() {
    return this.tenantId;
  }
  
  public void setTenantId(Long tenantId) {
    this.tenantId = tenantId;
  }
}
